package com.meadin.agent.driver;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class MyWebDriver {

	private static WebDriver driver;

	public static WebDriver getIntance() {

		if (driver != null) {
			return driver;
		} else {
			if (driver == null) {
				synchronized (MyWebDriver.class) {
					System.setProperty("webdriver.chrome.driver", "C:/dfws/driver/chromedriver.exe");
					ChromeOptions options = new ChromeOptions();
					options.addArguments("--window-size=800,500");
					options.addArguments("--ignore-certificate-errors");
					driver = new ChromeDriver(options);
				}
			}
		}
		return driver;
	}

}
